package com.tyj.seckill.service;

import com.tyj.seckill.to.SeckillSkuRedisTo;

import java.util.List;

public interface SeckillService {
    /**
     * 将3以内的所有秒杀活动存入redis
     */
    void uploadSeckillSkuLatest3Days();

    /**
     *得到当前正在处于活动阶段的活动
     * @return
     */
    List<SeckillSkuRedisTo> getCurrentSeckillSkus();

    /**
     * 得到当前商品的秒杀信息
     * @param skuId
     * @return
     */
    SeckillSkuRedisTo getSeckillSkuInfo(Long skuId);

    String kill(String killId, String key, Integer num) throws InterruptedException;
}
